#ifndef _TCPSERVER_H__
#define _TCPSERVER_H__


class TcpServer
{
public:
    void connectServer(const char * ip,int port);
    /* 发送数据 */
    int sendMessage(const void * sendMsg,size_t size);
    /* 发送数据 */
    int sendMessage(const std::string & sendMsg);
    /* 接收数据 */
    int recvMessage(void * buf,size_t size);
    /* 接收数据 */
    int recvMessage(std::string &recvMsg);
    /* 设置通信句柄 */
    void setAttrConnfd(int connfd);
public:
    int m_connfd;
};




#endif